-
Couldn't load subscription status.
- Fork 138
rfq+rfqmsg: add structured price oracle error codes #1766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 0-8-0-staging
Are you sure you want to change the base?
Conversation
0a5e9ab to
6bdb36a
Compare
Pull Request Test Coverage Report for Build 17268575857Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken another look through this.
IMO needs commit squash and then we can review the set of commits which will be merged.
5eaf8a9 to
a164c40
Compare
965998d to
83a4116
Compare
a164c40 to
e78d038
Compare
Adds the 'UnspecifiedRejectCode' and 'UnavailableRejectCode' consts to represent the two protocol-defined rejection error codes of 0 and 1, respectively. The 'NewRejectErr' utility produces a RejectErr with the UnspecifiedRejectCode code, but pairs it with a custom error message.
Defines an OracleErrorCode type representing error codes returned by a price oracle, and updates proto definitions accordingly.
Marshalls oracle error codes received over-the-wire into OracleErrorCode values, which are returned in oracle error responses.
Adds a 'QueryError' type for capturing the error resulting from a price oracle query. These errors are used to construct quote reject messages.
Adds a flag (defaulting to false) that indicates that the error returned by a price oracle should be considered public, and can be safely forwarded to peers. Updates proto definitions accordingly.
|
@GeorgeTsagk: review reminder |
Adds some structure to price oracle error codes, along with some custom handling for them. In particular, a code of '1' now corresponds to an 'unsupported asset' error, which, considered a 'public' error, is forwarded in the customizable message field of the reject messages sent to peers. An error with any other code continues, at present, to be treated as an unspecified error.
Resolves #1749, #1326.
(This is a refinement over the closed #1751, which forwarded errors indiscriminately.)